Kameleon-Plus  0.3.2
ENLILInterpolator.h
Go to the documentation of this file.
1 /*
2  * ENLILInterpolator.h
3  *
4  * Created on: Jul 9, 2009
5  * Author: dberrios
6  */
7 
8 #ifndef ENLILINTERPOLATOR_H_
9 #define ENLILINTERPOLATOR_H_
10 
11 #include "Interpolator.h"
12 #include "Model.h"
13 #include <string>
14 
15 namespace ccmc
16 {
24  {
25  public:
26  ENLILInterpolator(Model * model);
27  float interpolate(const std::string& variable, const float& r, const float& lat, const float& lon);
28  float interpolate(const std::string& variable, const float& r, const float& lat, const float& lon,
29  float& dr, float& dlat, float& dlon);
30  float interpolate(const long& variableID, const float& r, const float& lat, const float& lon);
31  float interpolate(const long& variableID, const float& r, const float& lat, const float& lon,
32  float& dr, float& dlat, float& dlon);
33 
34 
35  virtual ~ENLILInterpolator();
36 
37  private:
38  //TODO: fix these coordinate names. phi should be longitude, theta should be latitude
39  const std::vector<float> * r_data;
40  const std::vector<float> * lat_data; //theta
41  const std::vector<float> * lon_data; //phi
42  std::string r_string;
43  std::string lat_string;
44  std::string lon_string;
45  int nr;
46  int nlat;
47  int nlon;
48  float interpolate_in_block_enlil(float r, float lon, float lat, int ir, int ilat, int ilon,
49  long variableID, float& dr, float& dlat, float& dlon);
50  float previous_r;
51  float previous_lon;
52  float previous_lat;
53  int previous_ir;
54  int previous_ilon;
55  int previous_ilat;
56  };
57 }
58 
59 #endif /* ENLILINTERPOLATOR_H_ */